import { mapGetters } from 'vuex'
export default {
  methods: {
    checkPermission(key) {
      const { roles } = this.$store.getters.userInfo
      if (roles.points && roles.points.lenght) {
        return !roles.points.some(item => item.toLocaleLowerCase() === key)
      }
      return true
    }
  },
  computed: {
    ...mapGetters(['points'])
  }
}
